Embedding video & audio in WordPress – revision 3

This tutorial is outdated. We will update it soon.  In the meantime, please have a look at Embed a youtube video on WordPress instead. We keep this post published because it contains comments that have useful links. But the content has been stripped because it is no longer valid.

48 thoughts on “Embedding video & audio in WordPress – revision 3”

  1. Hi,

    I just need some help if possible, whenever i drop flash embed into the <code> tags in the html editor then one i save it then it erases everything in the <code> tags. Any ideas?

    Thanx alot
    Leon du Preez

  2. Normally, this should not happen. I did notice that you write <code><code> instead of <code></code> which might have something to do with it, unless that is a typo in your comment here. It may depend on the version of WordPress as well, I couldn’t figure that out.
    Or there is a typo in the embedding code. In any case, to avoid problems, you can download a Flash player plugin and use the native code from the plugin which is very simple.

    Embedding code will be phased out in the future as it is depreciated code. Here is a good plugin to download: https://www.mac-dev.net/blog/index.php
    Just follow the instructions. Let me know if you have further problems.

  3. I could kiss you! After hours of frustration with plugins that didn’t work at all, I found your instructions….worked like a charm, and took about 30 seconds!

    Thank you!

  4. ok you SHOW NO WAY to imbed AUDIO in WORDPRESS!!!!! YOU GO STRAIGHT TO VIDEO!! THERE IS NO WAY TO IMBED AUDIO IN A WORDPRESS BLOG UNLESS YOU BUY A ‘SPACE UPGRADE’ FROM THEM! THEY FORCE YOU TO DO THIS!! IVE TRYED [audio http://music url] oh the cute lil ‘audio player’ appears BUT WHEN YOU CLICK ON IT IT DONT WORK!!!! YOU ARE FORCED TO BUY THE SPACE UPGRADE $19.99 FROM WP! everyone knows how to imbed video from youtube in wp. skip the friggen semantics and GET TO THE POINT!!! THE QUESTION IS: HOW TO IMBED AUDIO AUDIO AUDIO IN WP BLOGS FOR FREE! sheesh!

  5. You are right, I forgot to include audio in this article.
    There is no need to buy anything (at least if you have a standalone version of WP), here is an example how you can place an audio:
    [flashvideo filename=myaudio.mp3″ width=200 height=220 image=andrew-patricio.jpg /]
    where myaudio.mp3 is the audio and andrew-patricio.jpg is a poster image. If you do not want a poster image, leave out the part image=andrew-patricio.jpg and set the height to 20.
    Best use a full path to image and audio, starting with http://
    That’s it.

    Would be nice if you were a bit more polite next time.

  6. One thing about WordPress is that it does NOT like apostrophes from different editing sources.

    When you cut an paste an apostrophe from Word or a.txt file it will sometimes error out the post or page. This happened to my site countless times.

  7. From a txt file, when you switch from Mac to PC or the other way around, that is possible. With MS Word or OpenOffice, you copy also hidden formatting information that can mess up a page. Best use the “T” icon in the editor to paste text indirectly so that formatting is filtered out. In fact, most CMS have this problem, including Joomla.

  8. Hi,
    I found your tutorial very useful. I was wondering though, is there a way to centre the video, and what would be the code for that? Thanks so much 🙂

  9. Hi Alice,

    Yes, you can. You make use of the div tag, like this:
    <div align="center">
    <object …..>…..
    …. </embed></object>
    </div>

    To make sure WordPress does not wipe away the div tag afterwards , enclose it in code tags, like this:

    <code>
    <div align="center">
    <object……>…..
    ….</embed></object>
    </div>
    </code>

  10. This doesn’t work at all for me. I’m using WordPress 3.0.4. Just trying to get a Quicktime or FLV video on my ftp site working with a player. Can’t seem to get it working this way using Insert in the Word Press menu, but this code is not giving me anything at all. Been trying and trying.

  11. Didn’t work for me either.

    I’m trying to embed an mp4 which is one the host with wordpress.

    And unfortunately, there is no link to give because the page is not going to be published until the video works.

  12. i wanted to stream a video from youtube to my site,
    i did as intructed but the frame did not display.

  13. Hi Rudolf,
    sorry to be so ignorant.
    Am i to understand, that if i copy your green text contained within the and tags. Change the portions in red.
    The dimensions and the address where the mp4 file is located. I copy that into the html portion of a new post in WPress.
    The location address for me is my WP site and therefore mydomain.com/tapcophonecontoller/wp-content/uploads etc

    It should show and play the file in the post?

    So i am adding this

    now when i put that into the HTML, and update. It disappears and im left with

    I did see another person with that problem.
    But i retyped it all in.

    SOrry for all the space my question took up.

  14. Hi John,
    Indeed, you copy the green code and change the red part according to your situation. I cannot see the code you added because the commentbox doesn’t alow that, sorry about that.

    But, MP4 is best played via a player. It won’t play without a video player on most modern browsers, although previously I said you could. You can install a video plugin like Flash Video or Simple Video. Both create the code for you automatically. The embedding method I describe above works best with MOV and MP3, it is not longer reliable with other formats.
    Rule of the thumb today is: use a video plugin if you have a variety of formats.
    I adapted this article in the meantime because it is quite old, not everything was correct anymore. A couple of formats are no longer widely used, like AVI or WMV.

  15. Hi dear all,
    I really appreciate your help at this matter. I want to embed a podcast (mp3) hosted on Podbean.com. I’ve tried different options read in different forums, until I found this https://en.support.wordpress.com/space-upgrade/ Does it mean there is no way to upload an mp3 file but paying for an upgrade? If there is a simple way, please let me know.
    Thank you!
    Evelyn

    P.S. This is what I read in this forum, but I don’t know how to apply it without paying.
    Rudolf Boogerman Says:
    June 18th, 2010 at 9:59 am
    “You are right, I forgot to include audio in this article.
    There is no need to buy anything (at least if you have a standalone version of WP), here is an example how you can place an audio:
    [flashvideo filename=myaudio.mp3” width=200 height=220 image=andrew-patricio.jpg /]
    where myaudio.mp3 is the audio and andrew-patricio.jpg is a poster image. If you do not want a poster image, leave out the part image=andrew-patricio.jpg and set the height to 20.
    Best use a full path to image and audio, starting with http://
    And here is this example in practice: http://www.womencorp.org/?p=365
    That’s it.”

  16. Hi Evelyn,

    The tutorial here is meant for standalone versions of WordPress. If you are on WordPress.com, you probably have to upgrade because they blocked rich media content. Now, I do not have first hand experience with wordpress.com, so I can’t assure you that paying is going to solve this.
    Instead, you might consider having your own wordpress site on shared hosting. That way, you have no restrictions whatsoever.
    Dreamhost.com, hostgator.com and others make it really easy to install WordPress since they have it in their application vault.

    Also, you do not lose your content. You can export it via Tools > Export and then import all your categories, posts and pages in your new installation, again via Tools, but this time select Import.
    I would really consider this because being on wordpress.com is fine to start with, but if you want to move on and make your site successful, you need your own domain name and web space.

    I hope this helps?

  17. pls guys am new to website building i do not understanding any thing here pls i want to build a website where visitors can download mp3 and video but i do not know how to start my coding help me pls. my e-mail is youngwest2020@yahoo.com i need codes to use. pls guys help me.

  18. Jeremiah, for downloading, you just create a link to the video or audio, like:
    <a href="http://mydomain.com/my-audio.mp3">Download audio</a>

    I hope this helps?

  19. I’m positive it is my error, but I am trying to use your code to embed the video within a WP for Joomla blog post. I’m using Joomla 1.5.22, WP 3.0.1.2, and of course the video files are .mov for the time being. I’m working on having my boss allow me to purchase conversion software because I’m and getting nothing but horrible headaches dealing with .mov files. When I use the following code without the double brackets before the code it doesn’t show up at all in the post. Just a blank space. Any advice?

    {{}}

  20. I am trying to embed a video into a wordpress blog which is hosted through godaddy.com (I think that’s how it works). It uses flash player and will not embed. Can you help?

  21. And here, 3 years and 2 months after the original post, I am seeking assistance from Rudolf Boogerman. 🙂

    Hopefully, this isn’t too far off the subject. I am looking for some simple html code to make an mp3 play starting at a certain start time. With YouTube videos, you simply add #t=01m42s to the end of the file, and it starts playing at the designated time, in this case 1 minute 42 seconds.

    Is there anything like this for playing an audio file in the browser? (Ex. domain.com/song.mp3#t=01m42s or something similar) or some simple code to add to the code for the Google audio player to make a file start at a certain anchor or cue? (Ex. of Google audio player code below)

    Thanks for any assistance!

  22. Oops, the Google code didn’t show up. Probably not necessary anyway. I was just showing where I was starting from. Thanks again!

  23. Hi Rudolf,
    I’m trying to embed a BBC video into a post. I’ve added the CODE tags to it but even though the placeholder shows up, the video and the player won’t show. Here’s a copy of the code for you:

    Your help would be most appreciated.
    Cheers.

  24. Hi there! Do you know if they make any plugins to assist with SEO?

    I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good success.
    If you know of any please share. Thank you!

    • There are quite a few good plugins where All-in-one-SEO is the most famous.
      MBP ping optimizer is quite good as well. It helps prevent repinging posts again after editing typos, for instance. unfortunately, the guy who runs it sends a lot of spam and as a result, he has been removed from the library of WP, but you can find it easily via Google.
      For the rest, good SEO relies on good content.

  25. So embedding video/audio files in wordpress is pretty simple depending on the video serving platform you use. I personally like uploading the raw .avi or .mp4 to my server at Search bloom and then us an HTML 5 video player. Much faster than loading an haha

  26. Hi Rudolf,
    I’m trying to embed a BBC video into a post. I’ve added the CODE tags to it but even though the placeholder shows up, the video and the player won’t show. Here’s a copy of the code for you:

Comments are closed.